package com.fun.demo.juc;

import java.util.concurrent.atomic.AtomicInteger;

public class XAtomicInteger {
    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger();

        int r = atomicInteger.addAndGet(3);
      //  int r = atomicInteger.getAndAdd(3);
        System.out.println(r);
        System.out.println(atomicInteger.get());
    }
}
